package cn.gxa.j229.bug.finance.mapper;

import cn.gxa.j229.bug.finance.pojo.Ad;
import cn.gxa.j229.bug.finance.pojo.Essay;

import java.util.List;
import java.util.Map;

public interface EssayMapper {
    int delete(Integer id);

    int insert(Essay essay);

    int insertSelective(Essay essay);

    //根据id查询
    List<Map<String,Object>> selectById(Integer id);

    //模糊查询标题
    List<Map<String,Object>> selectByTitle(String title);
    //根据分类查询
    List<Map<String,Object>> selectByType(String type);
    //根据状态查询
    List<Map<String,Object>> selectByState(Integer state);
    //分页查询
    List<Map<String,Object>> selectByPage(Essay essay);

    int selectByPageCount(Essay essay);
    //
    int updateByPrimaryKeySelective(Essay essay);
    //修改
    int update(Essay essay);
    //查询全部分类
    List selectAllType();

    List<Map<String,Object>> selectCount();

}